package com.example.enums;

/**
 * @author John
 */
public enum ResultEnum {
    /**
     * 枚举的信息
     */

    UNKONW_ERROR(-1,"【未知错误】"),
    SUCCESS(0,"【成功】"),
    ADMIN_EROOR(100,"【你不是管理员吧，管理员只有一个】"),
    NULL_ERROR(404,"【空异常】"),
    INSERT_SUCCESS(66,"【插入成功】"),
    UPDATE_SUCCESS(55,"【更新成功】"),
    DELETE_SUCCESS(44,"【删除成功】"),
    SEARCH_SUCCESS(33,"【查询成功】"),
    INSERT_EROOR(666,"【插入失败】"),
    UPDATE_EROOR(555,"【更新失败】"),
    DELETE_EROOR(444,"【删除失败】"),
    SEARCH_EROOR(333,"【查询失败】")
    ;
    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }


    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
